#include <iostream>
#include <vector>

using namespace std;

int main_0020(void)
{
    int x = 0;

    cin >> x;

    vector<int> arr;

    while (x) {
        arr.push_back(x % 10);
        x /= 10;
    }

    cout << arr.size() << endl;
    for (vector<int>::iterator it = arr.end() - 1; it >= arr.begin(); --it) {
        cout << *it << endl;;
    }

    return 0;
}
